<script setup>
import { ref } from 'vue'
import BlogPost from '@/components/chapter08/base/7.3.0BlogPost.vue'
const postFontSize = ref(1)
</script>

<template>
  <h2>使用组件例子!</h2>
  <div :style="{ fontSize: postFontSize + 'em' }">
    <!-- <BlogPost v-for="i in 3" :key="i" :title="`第${i}篇博客`" :subtitle="`第${i}副标题`" /> -->
    <BlogPost
      v-for="i in 3"
      :key="i"
      :title="`第${i}篇博客`"
      :subtitle="`第${i}副标题`"
      @enlarge-text="postFontSize += 0.1"
    >
      这是文章的内容
    </BlogPost>
  </div>
</template>
